package study;

public class Main {

    public static void main(String[] args) {
        Directory root = new Directory("root");
        Directory bin = new Directory("bin");
        Directory tmp = new Directory("tmp");
        Directory usr = new Directory("usr");

        root.add(bin);
        root.add(tmp);
        root.add(usr);

        File vi = new File("vi", 10000);
        File latex = new File("latex", 20000);

        bin.add(vi);
        bin.add(latex);

        Directory yuki = new Directory("yuki");
        Directory hanako = new Directory("hanako");
        Directory tomura = new Directory("tomura");

        usr.add(yuki);
        usr.add(hanako);
        usr.add(tomura);

        yuki.add(new File("diary.html", 1000));
        yuki.add(new File("Composite.java", 2000));

        hanako.add(new File("memo.tex", 300));

        tomura.add(new File("game.doc", 400));
        tmp.add(new File("lunk.mail", 500));

        root.printList();
    }

}
